home *** CD-ROM | disk | FTP | other *** search
- i = 0;
- while(i < ymax)
- {
- j = 0;
- while(j < xmax)
- {
- cel[i][j].reach = 0;
- cel[i][j].po = -1;
- j++;
- }
- i++;
- }
- i = 0;
- while(i < ymax)
- {
- j = 0;
- while(j < xmax)
- {
- if(cel[i][j].stat == 1)
- {
- k = 0;
- while(k < 6)
- {
- var nx = !(i % 2) ? j + addx0[k] : j + addx1[k];
- var ny = i + addy0[k];
- if(cel[ny][nx].win)
- {
- cel[i][j].reach = cel[i][j].reach + 1;
- }
- k++;
- }
- }
- j++;
- }
- i++;
- }
- f = 0;
- if(go_out() == 0)
- {
- if(goto_win() == 0)
- {
- if(get_nearest() == 0)
- {
- if(rand_move() == 0)
- {
- f = 1;
- }
- }
- }
- }
- if(f)
- {
- gotoAndStop("over");
- }
- else
- {
- mcCat.start_jump(catdir);
- }
-